home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / apps / tex / lametex_.z / lametex_ / lametex / page / page_latex.ps < prev    next >
Encoding:
Text File  |  1992-09-02  |  1.9 KB  |  63 lines

  1. %! page_latex.ps    - A replica of the standard LaTeX page
  2. %% This is a LameTeX Page Description File written in PostScript.
  3. %% Postscript Code by Jon Monsarrat Copyright 1992
  4. %% permission given for anything except selling this or deleting the header.
  5. %% This is a page template for the LameTeX formatter
  6. %% A normal page for LameTeX output to look like LaTeX output
  7.  
  8. %%%%%%%%%%%  icon-name  LeftMarginIcon   - %%%%%%%%%%%%
  9. % Given the name of an icon, executes the icon in the left margin.
  10. /LeftMarginIcon
  11. {
  12.   gsave
  13.        20 ypos 72 sub translate cvx exec
  14.   grestore
  15. } bind def
  16.  
  17. %% REQUIRED DEFINITIONS START HERE %%
  18.  
  19. % Makes a path that desribes the page
  20. /PageShape
  21. {
  22.   0 0 moveto 8.5 in 0 lineto 8.5 in 11 in lineto 0 11 in lineto closepath
  23.   currentflat 8 mul
  24. } bind def
  25.  
  26. % Anything to do when a new page is started
  27. /StartPage
  28. {
  29. } bind def
  30.  
  31. % Anything to do when a new page is ended
  32. /EndPage
  33. {
  34.    pagenumber 4 string cvs
  35.    dup stringwidth pop 8.5 in
  36.    formatdict /rightmargin get sub
  37.    formatdict /leftmargin get sub 
  38.    exch sub 2 div formatdict /leftmargin get add
  39.    formatdict /bottommargin get 2 div moveto show
  40.    /pagenumber pagenumber 1 add def
  41.    showpage  % A new page here really does mean start a new page.
  42. } bind def
  43.  
  44. %% INITIALIZATION TO DO WHEN FILE IS LOADED %%
  45. % Page-specific defaults that describe the page.
  46. /InitPage
  47. {
  48.   /evenodd true def   % if true use even-odd rule; false means winding rule
  49.   /fillout false def  % true means fill outside shape. false is inside.
  50.  
  51.   /in { 72 mul } def
  52.   /BM 0 in def    % Absolute Bottom Margin for page
  53.   /TM 11 in def   % Absolute Top Margin for page
  54.   /LM 0 in def    % Absolute Left Margin for page
  55.   /RM 8.5 in def  % Absolute Right Margin for page
  56.   
  57.   userdict /pagenumber known not   % Initialize pagenumber if not done already
  58.   { userdict begin /pagenumber 1 def end} if
  59. } bind def
  60.  
  61. InitPage        % Just loading this file initializes the page.
  62.  
  63.